#pragma once

#include "Base/Tests/Test.Application.h"

#undef  APP_NAME
#define APP_NAME	TestDate
#undef  APP_BASE
#define APP_BASE	TestApp


class APP_NAME : public APP_BASE
{
public:
	APP_NAME (IPlatform *platform, EDevice::type deviceType) :
		APP_BASE( platform, deviceType )
	{
	}

	void OnEnter () override
	{
		Date	date;

		date.Now();

		string	str;

		str	<< string().FormatAlignedI( date.day, 2, 10 ) << '/'
			<< string().FormatAlignedI( date.month, 2, 10 ) << '/'
			<< string().FormatAlignedI( date.year, 4, 10 ) << "\n"
			<< string().FormatAlignedI( date.hour, 2, 10 ) << ':'
			<< string().FormatAlignedI( date.minute, 2, 10 ) << ':'
			<< string().FormatAlignedI( date.second, 2, 10 ) << '.'
			<< string().FormatAlignedI( date.milliseconds, 3, 10 );

		LOG( str.cstr(), ELog::INFO );

		GetPlatform()->ShowNotification( str.cstr(), true );
	}
};